<?php
class AccountController extends AppController {
	
	public function beforeFilter() {
		parent::beforeFilter();
	}
	
	public function index() {
	}
	
	public function login() {
		$data = array(
			'id' => 1,
			'username' => 'marco',
			'name' => 'Marco'
		);
		
		if (!$this->Auth->login($data)) {
			$this->Session->setFlash("Error");
		} else {
			$this->redirect($this->Auth->redirect());
		}
	}
	
	public function logout() {
		$this->redirect($this->Auth->logout());
	}
}
?>